package com.longway.core.toolbox.dd.api;

import java.io.Serializable;

public class ApiConfig implements Serializable {

	private static final long serialVersionUID = 5232843606694801446L;
	private String appkey = null;
	private String appSecret = null;
    
    public ApiConfig() {
    }

    public ApiConfig(String appkey, String appSecret) {
    	setAppkey(appkey);
        setAppSecret(appSecret);
    }

    public String getAppSecret() {
        if (appSecret == null) {
            throw new IllegalStateException("appSecret 未被赋值");
        }
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        if (appSecret == null) {
            throw new IllegalArgumentException("appSecret 值不能为 null");
        }
        this.appSecret = appSecret;
    }

	public String getAppkey() {
		if (appkey == null) {
            throw new IllegalStateException("appkey 未被赋值");
        }
		return appkey;
	}

	public void setAppkey(String appkey) {
		if (appkey == null) {
            throw new IllegalArgumentException("appkey 值不能为 null");
        }
		this.appkey = appkey;
	}
}


